# $Id: PKGBUILD 166029 2012-09-04 15:05:53Z foutrelis $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: György Balló <ballogy@freestart.hu>

pkgname=mythes-hu
pkgver=1.0
pkgrel=3
pkgdesc="Hungarian thesaurus"
arch=('any')
url="http://extensions.services.openoffice.org/project/hu_dicts"
license=('GPL')
optdepends=('libmythes: offers thesaurus library functions')
source=(http://extensions.services.openoffice.org/e-files/1283/9/dict-hu.oxt)
md5sums=('d320e43e815c2dfd599dbfb7cd0e41fb')

package() {
  cd "$srcdir"
  install -Dm644 th_hu_HU_v2.dat $pkgdir/usr/share/mythes/th_hu_HU_v2.dat
  install -Dm644 th_hu_HU_v2.idx $pkgdir/usr/share/mythes/th_hu_HU_v2.idx

  # the symlinks
  install -dm755 ${pkgdir}/usr/share/myspell/dicts
  pushd $pkgdir/usr/share/myspell/dicts
    for file in $pkgdir/usr/share/mythes/*; do
      ln -sv /usr/share/mythes/$(basename $file) .
    done
  popd

  install -Dm644 README_th_hu_HU_v2.txt $pkgdir/usr/share/doc/$pkgname/README_th_hu_HU_v2.txt
}
